<template>
  <h1>{{ person.name }}</h1>
  <button @click="f1">传信息给aPP组件</button>
  <slot name="dyh"></slot>
</template>
  
<script>
import { reactive } from "vue";
export default {
  name: "Demo",
  props: ["school"],
  emits: ["hello"],
  setup(props, context) {
    //console.log(props, context);
    console.log(context.slots);
    let person = reactive({
      name: "林润钿",
    });
    function f1() {
      context.emit("hello", person.name);
    }
    return {
      person,
      f1,
    };
  },
};
</script>
  
  <style>
</style>
  